﻿@using Microsoft.AspNetCore.Components
@using Newbe.BookmarkManager.Services

<Row>
    <Col Span="24">
        <Card Size="small" Title="Title" Bordered="false">
            <Body>
            <Input @bind-Value="@BkEditFormModel.Title"/>
            </Body>
        </Card>
        <Card Size="small" Title="Tags" Bordered="false">
            <Body>
            <Space>
                <SpaceItem>
                    @foreach (var tag in BkEditFormModel.Tags)
                    {
                        <Tag Closable="true"
                             OnClosing="e => OnRemovingTag(tag)"
                             @key="@tag"
                             Color="@WebHelper.GetTagColor(tag)">
                            @tag
                        </Tag>
                    }
                </SpaceItem>
                <SpaceItem>
                    <TagInput OnNewTagsCreated="OnNewTagsAddAsync"
                              Options="@BkEditFormModel.AllTags"
                              IsAdding="true">
                    </TagInput>
                </SpaceItem>
            </Space>
            </Body>
        </Card>
        <Card Size="small" Title="Url" Bordered="false">
            <Body>
            <Input @bind-Value="@BkEditFormModel.Url" Disabled/>
            </Body>
        </Card>
    </Col>
</Row>